package com.unit.test.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author alexhu
 */
@Controller
@RequestMapping("/index")
public class DemoController {
    private static final Logger LOG = LoggerFactory.getLogger(DemoController.class);

    @RequestMapping(value = "/getData")
    @ResponseBody
    public String getData(@RequestParam(value = "searchPhrase", required = false) String searchPhrase) {
        String status = "{\"status\" : \"200\", \"searchPhrase\" : \"" + searchPhrase + "\"}";
        return status;
    }


}
